﻿using System.Data;

namespace PleaseORM.Drivers
{
	public abstract class AbstractDriver : IDriver
	{
		public abstract IDbConnection CreateConnection();
		public abstract IDbCommand CreateCommand();

		public virtual IDbCommand GenerateCommand(CommandType type, string sqlString)
		{
			var command = CreateCommand();
			command.CommandType = type;
			command.CommandText = sqlString;

			return command;
		}
	}
}
